Skip to content

Conversation

oscarba
Copy link
Member

@oscarba oscarba commented Nov 21, 2026

Closes #98

What

  • An expanded filter list scrolls by itself, with about seven values visible, so the page no longer grows
  • A search field in expanded lists, for example "spa" for Spania
  • Closing a list keeps focus on the button and scrolls it into view
  • The filter sidebar stays in view while scrolling the results on large screens

Testing

  • npm run check -- --e2e passes: all 8 checks, 424 unit tests and the whole e2e suite
  • New unit tests for search in lists, no hits, and focus when closing
  • New e2e tests for the scenario in the issue, search, the sticky sidebar and axe
  • Tested manually against the backend on the VM

…98)

An expanded list scrolls by itself and has a search field, so the page no longer grows by up to 40 values. Closing it keeps focus on the button and scrolls it into view. The sidebar stays in view on large screens.
@oscarba oscarba requested a review from a team as a code owner November 21, 2026 15:54
Copy link
Member

@siverne siverne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally: npm run check -- --e2e passes all 8 checks. In the browser, an expanded list scrolls in its own box instead of growing the page, closing it from the bottom leaves the button in view, and searching «spa» shows only Spania.

A few suggestions, none blocking:

«Ingen treff på …» is not announced. It is not in a live region, so a screen reader user typing in the field does not hear that the list became empty. A role="status" paragraph that is always in the DOM (as on the reviews) would fix it, ideally with the number of hits too.
The search does not ignore accents: «osterrike» does not find «Østerrike». The main search in the backend ignores accents, so normalize('NFD') here would match it.
When a list opens, focus stays on the button, which is now below the list. A keyboard user has to tab backwards past every value to reach the search field. Worth considering whether focus should move to the search field on open.
On a short window, the sticky sidebar scrolls and the expanded list scrolls inside it. Fine as it is, just worth a look.

@siverne siverne merged commit b8192d7 into main Nov 23, 2026
@siverne siverne deleted the 98-filter-list-focus branch November 23, 2026 13:03
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bad focus when closing an expanded filter list
2 participants